/********************************************************************************
 * FeedbackAction.java
 *
 * Created by Jigar Mistry
 * Last modified Date: Sep 5, 2008 11:34:45 AM by Jigar Mistry
 * Version : 0.1
 * Copyright (c) 2008 - 2009 cyberThink Infotech Pvt. Ltd., All rights reserved.
 ********************************************************************************/

package com.printeverywhere.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.apache.struts2.interceptor.ServletRequestAware;

import com.opensymphony.xwork2.ActionContext;
import com.printeverywhere.delegator.AuctionServiceDelegator;
import com.printeverywhere.delegator.CommonFunctionDelegator;
import com.printeverywhere.delegator.FeedbackServiceDelegator;
import com.printeverywhere.delegator.ItemsServiceDelegator;
import com.printeverywhere.delegator.UserServiceDelegator;
import com.printeverywhere.dto.AuctionWonlist;
import com.printeverywhere.dto.Feedback;
import com.printeverywhere.dto.Items;
import com.printeverywhere.dto.ListingOptions;
import com.printeverywhere.dto.User;
import com.printeverywhere.util.AdminConstants;
import com.printeverywhere.util.AttributeConstants;
import com.printeverywhere.util.DateUtil;
import com.printeverywhere.util.SearchCriteria;
import com.printeverywhere.util.SearchListCriteria;
import com.printeverywhere.util.SessionUtil;

// TODO: Auto-generated Javadoc
/**
 * The Class FeedbackAction.
 */
public class FeedbackAction extends FrontBaseSupport implements ServletRequestAware {

	public FeedbackAction() {
		super(true, false);
	}

	/** Logger for this class. */
	private static final Logger logger = Logger.getLogger(FeedbackAction.class);

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;

	/** The user id. */
	private String userId;

	/** The action. */
	private String action;

	private String returnAction;

	/** The redirectAction. */
	private String redirectAction;

	/** The from. */
	private String from;

	/** The to. */
	private String to;

	/** The rating. */
	private int rating;

	/** The record per page. */
	private int recordPerPage;

	/** The total feedback. */
	private int totalFeedback;

	/** The total positive feedback. */
	private int totalPositiveFeedback;

	/** The total neutral feedback. */
	private int totalNeutralFeedback;

	/** The total negative feedback. */
	private int totalNegativeFeedback;

	/** The total current feedback. */
	private int totalCurrentFeedback;

	/** The request. */
    private HttpServletRequest request;

	/** The feedbacks. */
	private List<Feedback> feedbacks = new ArrayList<Feedback>();

	/** The feedback. */
	private Feedback feedback;

	private List<AuctionWonlist> auctionWonlist = new ArrayList<AuctionWonlist>();

	private Map<Integer, Feedback> auctionWonmap = new HashMap<Integer, Feedback>();

	private User user;

	private SearchCriteria searchCriteria = new SearchCriteria();

	private SearchListCriteria searchListCriteria = new SearchListCriteria();

	private String pageAction;

	private String page;

	/** The rank. */
	private float rank;
	
	private Integer uidWantedTender = 0;

	public String execute() {
		return SUCCESS;
	}

	/**
	 * View user feedback.
	 *
	 * @return the string
	 */
	public String viewUserFeedback() {
		if (logger.isDebugEnabled()) {
			logger.debug("viewUserFeedback() - start"); //$NON-NLS-1$
		}

		this.recordPerPage = ((ListingOptions) ActionContext.getContext().getApplication().get(AdminConstants.LISTING_OPTIONS)).getLeaveFeedbackItemsPerPage();
		this.action = "submitFromUserFeedback.htm";
		this.redirectAction = "viewMyFeedback.htm";

		if (logger.isDebugEnabled()) {
			logger.debug("viewUserFeedback() - end"); //$NON-NLS-1$
		}
		return SUCCESS;
	}

	/**
	 * Submit from user feedback.
	 *
	 * @return the string
	 */
	public String submitFromUserFeedback() {
		if (logger.isDebugEnabled()) {
			logger.debug("submitFromUserFeedback() - start"); //$NON-NLS-1$
		}

		SearchCriteria searchCriteria = new SearchCriteria();
		searchCriteria.setAttribute(AttributeConstants.USER_ID, userId);
		if(UserServiceDelegator.getList(searchCriteria).size() > 0) {
			this.from = "";
			this.to = null;

			if (logger.isDebugEnabled()) {
				logger.debug("submitFromUserFeedback() - end"); //$NON-NLS-1$
			}
			return SUCCESS;
		} else {
			addActionError("User not found...");

			if (logger.isDebugEnabled()) {
				logger.debug("submitFromUserFeedback() - end"); //$NON-NLS-1$
			}
			return ERROR;
		}
	}

	/**
	 * Feedback for others.
	 *
	 * @return the string
	 */
	public String feedbackForOthers() {
		if (logger.isDebugEnabled()) {
			logger.debug("feedbackForOthers() - start"); //$NON-NLS-1$
		}

		this.recordPerPage = ((ListingOptions) ActionContext.getContext().getApplication().get(AdminConstants.LISTING_OPTIONS)).getLeaveFeedbackItemsPerPage();
		this.action = "submitToUserFeedback.htm";
		this.redirectAction = "viewMyFeedbackForOthers.htm";

		if (logger.isDebugEnabled()) {
			logger.debug("feedbackForOthers() - end"); //$NON-NLS-1$
		}
		return SUCCESS;
	}

	/**
	 * Submit to user feedback.
	 *
	 * @return the string
	 */
	public String submitToUserFeedback() {
		if (logger.isDebugEnabled()) {
			logger.debug("submitToUserFeedback() - start"); //$NON-NLS-1$
		}

		SearchCriteria searchCriteria = new SearchCriteria();
		searchCriteria.setAttribute(AttributeConstants.USER_ID, userId);
		if(UserServiceDelegator.getList(searchCriteria).size() > 0) {
			this.from = null;
			this.to = "";

			if (logger.isDebugEnabled()) {
				logger.debug("submitToUserFeedback() - end"); //$NON-NLS-1$
			}
			return SUCCESS;
		} else {
			addActionError("User not found...");

			if (logger.isDebugEnabled()) {
				logger.debug("submitToUserFeedback() - end"); //$NON-NLS-1$
			}
			return ERROR;
		}

	}

	/**
	 * Feedback for seller.
	 *
	 * @return the string
	 */
	public String feedbackForSeller() {
		if (logger.isDebugEnabled()) {
			logger.debug("feedbackForSeller() - start"); //$NON-NLS-1$
		}

		this.pageAction = "feedbackForSeller.htm";
		
		if(request.getParameter("cid") != null){
			if(request.getParameter("p") != null){
				String redirect = request.getParameter("p");
				this.pageAction = redirect+".htm";
				
				user = SessionUtil.getUser(request);
				if(request.getParameter("uid") != null){
					uidWantedTender = Integer.parseInt(request.getParameter("uid"));
				}
				int itemId = Integer.parseInt(request.getParameter("cid"));
				searchCriteria.removeAllAttribute();
				searchCriteria.setAttribute("userByFromUserId.id", user.getId());
				searchCriteria.setAttribute("itemId.itemId", itemId);
				feedback = FeedbackServiceDelegator.getFeedbackByUserItemId(searchCriteria);
				
				if(feedback == null){
					searchCriteria.removeAllAttribute();
					searchCriteria.setAttribute("items.itemId", itemId);
					auctionWonlist = (List<AuctionWonlist>) CommonFunctionDelegator.GeneralgetCriteriaList(AuctionWonlist.class.getName(), searchCriteria);
				}
				
			}
		}else{
			List<AuctionWonlist> allAuctionWonList = new ArrayList<AuctionWonlist>();
			user = SessionUtil.getUser(request);
			searchListCriteria.removeAllAttribute();
			searchListCriteria.setAttribute("user", new Object[]{user, SearchListCriteria.NE});

			try{
				List<AuctionWonlist> list = AuctionServiceDelegator.getAuctionWonlistListBySearchListCriteria(searchListCriteria);
				for (int i=0;i<list.size();i++) {
					if((list.get(i).getItems().getItemtype().getId() == 4)){
						int id = list.get(i).getItems().getUserId().getId();
						if(id == user.getId()){
							allAuctionWonList.add(list.get(i));
						}
					}
				}
			}catch (Exception e) {
				e.printStackTrace();
			}

			searchListCriteria.removeAllAttribute();
			searchListCriteria.setAttribute("user", new Object[]{user, SearchListCriteria.EQ});
			try{
				List<AuctionWonlist> list = AuctionServiceDelegator.getAuctionWonlistListBySearchListCriteria(searchListCriteria);
				for (int i=0;i<list.size();i++) {
					if((list.get(i).getItems().getItemtype().getId() != 4)){
						allAuctionWonList.add(list.get(i));
					}
				}
			}catch (Exception e) {
				e.printStackTrace();
			}

			for(int i=0;i<allAuctionWonList.size();i++){
				SearchCriteria searchCriteria = new SearchCriteria();
				searchCriteria.removeAllAttribute();
				if(allAuctionWonList.get(i).getItems().getItemtype().getId() == 4){
					searchCriteria.setAttribute("userByFromUserId.id", allAuctionWonList.get(i).getItems().getUserId().getId());
					searchCriteria.setAttribute("itemId.itemId", allAuctionWonList.get(i).getItems().getItemId());
				}else{
					searchCriteria.setAttribute("userByFromUserId.id", allAuctionWonList.get(i).getUser().getId());
					searchCriteria.setAttribute("itemId.itemId", allAuctionWonList.get(i).getItems().getItemId());
				}
				feedbacks = FeedbackServiceDelegator.getFeedbackListByUserId(searchCriteria);
				if(feedbacks.size()==0){
					auctionWonlist.add(allAuctionWonList.get(i));
				}
			}
		}
		
		for (AuctionWonlist auctionWon : auctionWonlist) {
			this.auctionWonmap.put(auctionWon.getId(), new Feedback());
		}

		if (logger.isDebugEnabled()) {
			logger.debug("feedbackForSeller() - end"); //$NON-NLS-1$
		}
		return SUCCESS;
	}

	/**
	 * Feedback for buyer.
	 *
	 * @return the string
	 */
	public String feedbackForBuyer() {
		if (logger.isDebugEnabled()) {
			logger.debug("feedbackForBuyer() - start"); //$NON-NLS-1$
		}

		page = "feedbackForBuyer.htm";

		if(request.getParameter("cid") != null){
			this.pageAction = "myWantedSold.htm";
			user = SessionUtil.getUser(request);
			int itemId = Integer.parseInt(request.getParameter("cid"));
			searchCriteria.removeAllAttribute();
			searchCriteria.setAttribute("userByFromUserId.id", user.getId());
			searchCriteria.setAttribute("itemId.itemId", itemId);
			feedback = FeedbackServiceDelegator.getFeedbackByUserItemId(searchCriteria);
			if(feedback == null){
				searchCriteria.removeAllAttribute();
				searchCriteria.setAttribute("items.itemId", itemId);
				auctionWonlist = (List<AuctionWonlist>) CommonFunctionDelegator.GeneralgetCriteriaList(AuctionWonlist.class.getName(), searchCriteria);
			}
		}else{
			this.pageAction = "feedbackForBuyer.htm";
			user = SessionUtil.getUser(request);
			List<AuctionWonlist> allAuctionWonList = new ArrayList<AuctionWonlist>();
			searchCriteria.removeAllAttribute();
			searchCriteria.setAttribute("user", user);
			try{
				List<AuctionWonlist> list = (List<AuctionWonlist>) CommonFunctionDelegator.GeneralgetCriteriaList(AuctionWonlist.class.getName(), searchCriteria);
				for (int i=0;i<list.size();i++) {
					if(list.get(i).getItems().getItemtype().getId() == 4){
						allAuctionWonList.add(list.get(i));
					}
				}
			}catch (Exception e) {
				e.printStackTrace();
				addActionError("Error while getting list for My wanted Sold items");
			}

			searchListCriteria.removeAllAttribute();
			searchListCriteria.setAttribute("user", new Object[]{user, SearchListCriteria.NE});
			try{
				List<AuctionWonlist> list = AuctionServiceDelegator.getAuctionWonlistListBySearchListCriteria(searchListCriteria);
				for (int i=0;i<list.size();i++) {
					if((list.get(i).getItems().getItemtype().getId() != 4)){
						allAuctionWonList.add(list.get(i));
					}
				}
			}catch (Exception e) {
				e.printStackTrace();
			}

			for(int i=0;i<allAuctionWonList.size();i++){
				SearchCriteria searchCriteria = new SearchCriteria();
				searchCriteria.removeAllAttribute();
				if(allAuctionWonList.get(i).getItems().getItemtype().getId() == 4){
					searchCriteria.setAttribute("userByFromUserId.id", allAuctionWonList.get(i).getItems().getUserId().getId());
					searchCriteria.setAttribute("itemId.itemId", allAuctionWonList.get(i).getItems().getItemId());
				}else{
					searchCriteria.setAttribute("userByFromUserId.id", allAuctionWonList.get(i).getUser().getId());
					searchCriteria.setAttribute("itemId.itemId", allAuctionWonList.get(i).getItems().getItemId());
				}
				feedbacks = FeedbackServiceDelegator.getFeedbackListByUserId(searchCriteria);
				if(feedbacks.size()==0){
					auctionWonlist.add(allAuctionWonList.get(i));
				}
			}
		}
		for (AuctionWonlist auctionWon : auctionWonlist) {
			this.auctionWonmap.put(auctionWon.getId(), new Feedback());
		}


		if (logger.isDebugEnabled()) {
			logger.debug("feedbackForBuyer() - end"); //$NON-NLS-1$
		}
		return SUCCESS;
	}

	/**
	 * Submit feedback.
	 *
	 * @return the string
	 */
	public String submitFeedback() {
		if (logger.isDebugEnabled()) {
			logger.debug("submitFeedback() - start"); //$NON-NLS-1$
		}

		user = SessionUtil.getUser(request);
		if(auctionWonmap != null){
			for (Feedback list  : this.auctionWonmap.values()) {
				Feedback tmpFeedback = new Feedback();
				if(list.getMessage() != null && !list.getMessage().trim().equals("")){
					if(list.getRating() != null){
				Items items = ItemsServiceDelegator.getItemsById(list.getItemId().getItemId());
				tmpFeedback.setPositive(list.getRating() == 1 ? true : false);
				tmpFeedback.setNeutral(list.getRating() == 0 ? true : false);
				tmpFeedback.setNegative(list.getRating() == -1 ? true : false);
				tmpFeedback.setUserByFromUserId(this.user);
				if(items.getItemtype().getId() == 4){
					if(uidWantedTender != null && uidWantedTender > 0){
						tmpFeedback.setUserByToUserId(UserServiceDelegator.getUser(uidWantedTender));
					}else{
						tmpFeedback.setUserByToUserId(UserServiceDelegator.getUser(items.getUserId().getId()));
					}
				}else{
					tmpFeedback.setUserByToUserId(UserServiceDelegator.getUser(list.getUserByToUserId().getId()));
				}
				tmpFeedback.setItemId(list.getItemId());
				tmpFeedback.setMessage(list.getMessage());
				tmpFeedback.setUserType(list.getUserType());

				FeedbackServiceDelegator.insertFeedback(tmpFeedback);
					}
				}
			}
		}

		if (logger.isDebugEnabled()) {
			logger.debug("submitFeedback() - end"); //$NON-NLS-1$
		}
		return SUCCESS;
	}

	/**
	 * View my feedback.
	 *
	 * @return the string
	 */
	public String viewMyFeedback() {
		try{
			if (logger.isDebugEnabled()) {
				logger.debug("viewMyFeedback() - start"); //$NON-NLS-1$
			}

			SearchCriteria searchCriteria = new SearchCriteria();
			this.from = "";
			this.to = null;
			if((request.getParameter("action") != null) && (!request.getParameter("action").equals(AdminConstants.NONE))){
				this.returnAction = request.getParameter("action");
			}
			if((request.getParameter("userId") != null) && (!request.getParameter("userId").equals(AdminConstants.NONE))){
				user = UserServiceDelegator.getUser(Integer.parseInt(request.getParameter("userId")));
				if(user != null){
					this.userId = user.getUserId();
				}
			}else if(this.getUserId() == null || this.getUserId().equals("")){
				this.userId = SessionUtil.getUser(request).getUserId();
			}

			searchCriteria.setAttribute("userByToUserId", UserServiceDelegator.getUserByUserId(userId));

			this.feedbacks = FeedbackServiceDelegator.getFeedbackListByUserId(searchCriteria);
			this.totalFeedback = feedbacks.size();
			this.action = "viewMyFeedback.htm";

			for (Feedback feedback : feedbacks) {
				this.totalNegativeFeedback += (feedback.isNegative() ? 1 : 0);
				this.totalNeutralFeedback += (feedback.isNeutral() ? 1 : 0);
				this.totalPositiveFeedback += (feedback.isPositive() ? 1 : 0);
			}

			this.rank = (this.totalPositiveFeedback * 100) / (float) this.totalFeedback;
			this.totalCurrentFeedback = 0;

			if (logger.isDebugEnabled()) {
				logger.debug("viewMyFeedback() - end"); //$NON-NLS-1$
			}
		}catch (Exception e) {
			if(returnAction != null && !returnAction.equals(AdminConstants.NONE)){
				return "favourite";
			}else{
				return INPUT;
			}
		}
		return SUCCESS;
	}

	/**
	 * View my feedback for others.
	 *
	 * @return the string
	 */
	public String viewMyFeedbackForOthers() {
		if (logger.isDebugEnabled()) {
			logger.debug("viewMyFeedbackForOthers() - start"); //$NON-NLS-1$
		}

		SearchCriteria searchCriteria = new SearchCriteria();
		this.from = null;
		this.to = "";

		if(this.getUserId() == null) {
			this.userId = SessionUtil.getUser(request).getUserId();
		}

		searchCriteria.setAttribute("userByFromUserId", UserServiceDelegator.getUserByUserId(userId));

		this.feedbacks = FeedbackServiceDelegator.getFeedbackListByUserId(searchCriteria);
		this.totalFeedback = feedbacks.size();
		this.action = "viewMyFeedbackForOthers.htm";

		for (Feedback feedback : feedbacks) {
			this.totalNegativeFeedback += (feedback.isNegative() ? 1 : 0);
			this.totalNeutralFeedback += (feedback.isNeutral() ? 1 : 0);
			this.totalPositiveFeedback += (feedback.isPositive() ? 1 : 0);
		}

		this.rank = (this.totalPositiveFeedback * 100) / (float) this.totalFeedback;
		this.totalCurrentFeedback = 0;

		if (logger.isDebugEnabled()) {
			logger.debug("viewMyFeedbackForOthers() - end"); //$NON-NLS-1$
		}
		return SUCCESS;
	}

	/**
	 * Gets the user id.
	 *
	 * @return the user id
	 */
	public String getUserId() {
		return userId;
	}

	/**
	 * Sets the user id.
	 *
	 * @param userId the new user id
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 * Gets the record per page.
	 *
	 * @return the record per page
	 */
	public int getRecordPerPage() {
		return recordPerPage;
	}

	/**
	 * Sets the record per page.
	 *
	 * @param recordPerPage the new record per page
	 */
	public void setRecordPerPage(int recordPerPage) {
		this.recordPerPage = recordPerPage;
	}

	/**
	 * Gets the total feedback.
	 *
	 * @return the total feedback
	 */
	public int getTotalFeedback() {
		return totalFeedback;
	}

	/**
	 * Sets the total feedback.
	 *
	 * @param totalFeedback the new total feedback
	 */
	public void setTotalFeedback(int totalFeedback) {
		this.totalFeedback = totalFeedback;
	}

	/**
	 * Gets the total positive feedback.
	 *
	 * @return the total positive feedback
	 */
	public int getTotalPositiveFeedback() {
		return totalPositiveFeedback;
	}

	/**
	 * Sets the total positive feedback.
	 *
	 * @param totalPositiveFeedback the new total positive feedback
	 */
	public void setTotalPositiveFeedback(int totalPositiveFeedback) {
		this.totalPositiveFeedback = totalPositiveFeedback;
	}

	/**
	 * Gets the total neutral feedback.
	 *
	 * @return the total neutral feedback
	 */
	public int getTotalNeutralFeedback() {
		return totalNeutralFeedback;
	}

	/**
	 * Sets the total neutral feedback.
	 *
	 * @param totalNeutralFeedback the new total neutral feedback
	 */
	public void setTotalNeutralFeedback(int totalNeutralFeedback) {
		this.totalNeutralFeedback = totalNeutralFeedback;
	}

	/**
	 * Gets the total negative feedback.
	 *
	 * @return the total negative feedback
	 */
	public int getTotalNegativeFeedback() {
		return totalNegativeFeedback;
	}

	/**
	 * Sets the total negative feedback.
	 *
	 * @param totalNegativeFeedback the new total negative feedback
	 */
	public void setTotalNegativeFeedback(int totalNegativeFeedback) {
		this.totalNegativeFeedback = totalNegativeFeedback;
	}

	/**
	 * Gets the total current feedback.
	 *
	 * @return the total current feedback
	 */
	public int getTotalCurrentFeedback() {
		return totalCurrentFeedback;
	}

	/**
	 * Sets the total current feedback.
	 *
	 * @param totalCurrentFeedback the new total current feedback
	 */
	public void setTotalCurrentFeedback(int totalCurrentFeedback) {
		this.totalCurrentFeedback = totalCurrentFeedback;
	}

	/**
	 * Gets the rank.
	 *
	 * @return the rank
	 */
	public float getRank() {
		return rank;
	}

	/**
	 * Sets the rank.
	 *
	 * @param rank the new rank
	 */
	public void setRank(float rank) {
		this.rank = rank;
	}

	/**
	 * Gets the feedbacks.
	 *
	 * @return the feedbacks
	 */
	public List<Feedback> getFeedbacks() {
		return feedbacks;
	}

	/**
	 * Sets the feedbacks.
	 *
	 * @param feedbacks the new feedbacks
	 */
	public void setFeedbacks(List<Feedback> feedbacks) {
		this.feedbacks = feedbacks;
	}

	/**
	 * Gets the from.
	 *
	 * @return the from
	 */
	public String getFrom() {
		return from;
	}

	/**
	 * Sets the from.
	 *
	 * @param from the new from
	 */
	public void setFrom(String from) {
		this.from = from;
	}

	/**
	 * Gets the to.
	 *
	 * @return the to
	 */
	public String getTo() {
		return to;
	}

	/**
	 * Sets the to.
	 *
	 * @param to the new to
	 */
	public void setTo(String to) {
		this.to = to;
	}

	/**
	 * Gets the action.
	 *
	 * @return the action
	 */
	public String getAction() {
		return action;
	}

	/**
	 * Sets the action.
	 *
	 * @param action the new action
	 */
	public void setAction(String action) {
		this.action = action;
	}

	/**
	 * Gets the feedback.
	 *
	 * @return the feedback
	 */
	public Feedback getFeedback() {
		return feedback;
	}

	/**
	 * Sets the feedback.
	 *
	 * @param feedback the new feedback
	 */
	public void setFeedback(Feedback feedback) {
		this.feedback = feedback;
	}

	/**
	 * Gets the rating.
	 *
	 * @return the rating
	 */
	public int getRating() {
		return rating;
	}

	/**
	 * Sets the rating.
	 *
	 * @param rating the new rating
	 */
	public void setRating(int rating) {
		this.rating = rating;
	}

	/**
	 * @return the request
	 */
	public HttpServletRequest getRequest() {
		return request;
	}

	/**
	 * @param request the request to set
	 */
	public void setRequest(HttpServletRequest request) {
		this.request = request;
	}

	public void setServletRequest(HttpServletRequest arg0) {
		request = arg0;
	}

	/**
	 * @return the redirectAction
	 */
	public String getRedirectAction() {
		return redirectAction;
	}

	/**
	 * @param redirectAction the redirectAction to set
	 */
	public void setRedirectAction(String redirectAction) {
		this.redirectAction = redirectAction;
	}

	public List<AuctionWonlist> getAuctionWonlist() {
		return auctionWonlist;
	}

	public void setAuctionWonlist(List<AuctionWonlist> auctionWonlist) {
		this.auctionWonlist = auctionWonlist;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Map<Integer, Feedback> getAuctionWonmap() {
		return auctionWonmap;
	}

	public void setAuctionWonmap(Map<Integer, Feedback> auctionWonmap) {
		this.auctionWonmap = auctionWonmap;
	}

	public String getPageAction() {
		return pageAction;
	}

	public void setPageAction(String pageAction) {
		this.pageAction = pageAction;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public String getReturnAction() {
		return returnAction;
	}

	public void setReturnAction(String returnAction) {
		this.returnAction = returnAction;
	}

	public Integer getUidWantedTender() {
		return uidWantedTender;
	}

	public void setUidWantedTender(Integer uidWantedTender) {
		this.uidWantedTender = uidWantedTender;
	}

}